<?php

class Form_HardwareForm extends Form_Custom_General {
 
    public function init() {
        
        $hard_id = $this->createElement('hidden', 'hard_id')
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60"));
        $this->addElement($hard_id);

        $hard_name = $this->createElement('text', 'hard_name')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_name"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "class" => "span6", "placeholder" => $this->translateObj->translate("hard_frm_name")));
        $this->addElement($hard_name);

      
     
        $build_id = $this->createElement('select', 'build_id')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array( "class" => "select2"))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_building"))));
        $this->addElement($build_id);
        
       /* $site_id = $this->createElement('select', 'site_id')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->setAttribs(Array( "class" => "select2"))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("build_required_site"))));
        $this->addElement($site_id);*/

        $hard_serial = $this->createElement('text', 'hard_serial')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_serial"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "class" => "span6", "placeholder" => $this->translateObj->translate("hard_frm_serial")));
        $this->addElement($hard_serial);
        
        $hard_exp_date = $this->createElement('text', 'hard_exp_date')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_exp_date"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "readonly" => "readonly", "class" => "span6 input-large datepicker", "placeholder" => $this->translateObj->translate("hard_frm_exp_date")));
        $this->addElement($hard_exp_date);
        
        $hard_location = $this->createElement('text', 'hard_location')
                ->setRequired(TRUE)
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_location"))))
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                ))
                ->setAttribs(Array("size" => "60", "class" => "span6", "placeholder" => $this->translateObj->translate("hard_frm_location")));
        $this->addElement($hard_location);

       
        $hard_status = $this->createElement('select', 'hard_status')
                ->setRequired(TRUE)
                ->addFilters(array(
                    new Zend_Filter_StringTrim(),
                    new Zend_Filter_StringToLower()
                ))
                ->addValidator('NotEmpty', true, array('messages' => array('isEmpty' => $this->translateObj->translate("hard_required_status"))));
        $this->addElement($hard_status);


        $submit = $this->createElement('submit', 'Save')
                ->setAttribs(Array('title' => "Save changes", 'class' => "btn-glow primary"))
                 ->setLabel($this->translateObj->translate("frm_save"));
        $this->addElement($submit);


        $reset = $this->createElement('reset', 'Reset')
                ->setAttribs(Array('title' => "Save changes and continue to edit", 'class' => "btn-glow primary"))
                 ->setLabel($this->translateObj->translate("frm_reset"));
        $this->addElement($reset);
    }

}